LVM
| developer = | released = | discontinued = | latest release version = 2.02.114 | latest release date = | latest preview version = | latest preview date = | frequently updated = | status = | programming language = C | operating system = Linux | platform = | size = | language = | language count = | language footnote = | genre = | license = GNU GPL | website = }} lvm-wa [[lojikol volyùm männeijmènt|'L'''ojikol '''V'olyùm Männeijmènt]] softwär päkeij für Linuks dè körnol. lvm-wa keyi biuld ùpon disk, partiçion or MD arrays krieiten bai mdadm . lvm manages disk drives and similar mass-storage devices. Heinz Mauelshagen wrote the original code in 1998, taking its primary design guidelines from the HP-UX's volume manager. The installers for the CrunchBang, CentOS, Debian, Fedora, Gentoo, Mandriva, MontaVista Linux, openSUSE, Pardus, Red Hat Enterprise Linux, Slackware, SLED, SLES, Linux Mint, Kali Linux, and Ubuntu distributions are LVM-aware and can install a bootable system with a root filesystem on a logical volume. Kòmmòn yuseij LVM-wa kòmmònli yusen für folowiŋ pörposes: * Managing large hard disk farms by allowing disks to be added and replaced without downtime or service disruption, in combination with hot swapping. * On small systems (like a desktop at home), instead of having to estimate at installation time how big a partition might need to be in the future, LVM allows file systems to be easily resized later as needed. * Performing consistent backups by taking snapshots of the logical volumes. * Creating single logical volumes of multiple physical volumes or entire hard disks (somewhat similar to RAID 0, but more similar to JBOD), allowing for dynamic volume resizing. * the Ganeti solution stack relies on the Linux Logical Volume Manager LVM can be considered as a thin software layer on top of the hard disks and partitions, which creates an abstraction of continuity and ease-of-use for managing hard drive replacement, re-partitioning, and backup. Features The LVM can: * Resize volume groups online by absorbing new physical volumes (PV) or ejecting existing ones. * Resize logical volumes (LV) online by concatenating extents onto them or truncating extents from them. * Create read-only snapshots of logical volumes (LVM1). * Create read-write snapshots of logical volumes (LVM2). * Create RAID logical volumes (available in newer LVM implementations): RAID 1, RAID 5, RAID 6, etc. * Stripe whole or parts of logical volumes across multiple PVs, in a fashion similar to RAID 0. * Configure a RAID 1 backend device (a PV) as write-mostly, resulting in reads being avoided to such devices unless necessary. * Allocate thin-provisioned logical volumes from a pool. * Move online logical volumes between PVs. * Split or merge volume groups in situ (as long as no logical volumes span the split). This can be useful when migrating whole logical volumes to or from offline storage. * Create hybrid volumes by using the dm-cache target, which allows one or more fast storage devices, such as flash-based solid-state drives (SSDs), to act as a cache for one or more slower hard disk drives (HDDs). The LVM will also work in a shared-storage cluster (where disks holding the PVs are shared between multiple host computers), but requires an additional daemon to propagate state changes between cluster nodes. Implementation LVM keeps a metadata header at the start of every physical volume, each of which is uniquely identified by a UUID. Each PV's header is a complete copy of the entire volume group's layout, including the UUIDs of all other PVs, the UUIDs of all logical volumes and an allocation map of PEs to LEs. This simplifies data recovery in the event of PV loss. In the 2.6-series of the Linux Kernel, the LVM is implemented in terms of the device mapper, a simple block-level scheme for creating virtual block devices and mapping their contents onto other block devices. This minimizes the amount of relatively hard-to-debug kernel code needed to implement the LVM. It also allows its I/O redirection services to be shared with other volume managers (such as EVMS). Any LVM-specific code is pushed out into its user-space tools, which merely manipulate these mappings and reconstruct their state from on-disk metadata upon each invocation. To bring a volume group online, the "vgchange" tool: # Searches for PVs in all available block devices. # Parses the metadata header in each PV found. # Computes the layouts of all visible volume groups. # Loops over each logical volume in the volume group to be brought online and: ## Checks if the logical volume to be brought online has all its PVs visible. ## Creates a new, empty device mapping. ## Maps it (with the "linear" target) onto the data areas of the PVs the logical volume belongs to. To move an online logical volume between PVs on the same Volume Group, use the "pvmove" tool: # Creates a new, empty device mapping for the destination. # Applies the "mirror" target to the original and destination maps. The kernel will start the mirror in "degraded" mode and begin copying data from the original to the destination to bring it into sync. # Replaces the original mapping with the destination when the mirror comes into sync, then destroys the original. These device mapper operations take place transparently, without applications or file systems being aware that their underlying storage is moving. Caveats Until Linux kernel 2.6.31, write barriers were not supported (fully supported in 2.6.33). This means that the guarantee against filesystem corruption offered by journaled file systems like ext3 and XFS was negated under some circumstances. Päkeijs # apt-get install lvm2 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: * libdevmapper-event1.02.1 * watershed Suggested packages: * thin-provisioning-tools The following NEW packages will be installed: # libdevmapper-event1.02.1 # lvm2 # watershed arkaiv-saiz: 492 kB, disk-yuseij: 1,427 kB. Dawnloud #Get: http://hk.archive.ubuntu.com/ubuntu/ trusty/main libdevmapper-event1.02.1 amd64 2:1.02.77-6ubuntu2 kB #Get: http://hk.archive.ubuntu.com/ubuntu/ trusty/main watershed amd64 7 kB #Get: http://hk.archive.ubuntu.com/ubuntu/ trusty/main lvm2 amd64 2.02.98-6ubuntu2 kB Fetched 492 kB in 15s (31.0 kB/s) Selecting previously unselected package libdevmapper-event1.02.1:amd64. (Reading database ... 173994 files and directories currently installed.) Instoleiçion Preparing to unpack .../libdevmapper-event1.02.1_2%3a1.02.77-6ubuntu2_amd64.deb ... Unpacking libdevmapper-event1.02.1:amd64 (2:1.02.77-6ubuntu2) ... Selecting previously unselected package watershed. Preparing to unpack .../archives/watershed_7_amd64.deb ... Unpacking watershed (7) ... Selecting previously unselected package lvm2. Preparing to unpack .../lvm2_2.02.98-6ubuntu2_amd64.deb ... Unpacking lvm2 (2.02.98-6ubuntu2) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up libdevmapper-event1.02.1:amd64 (2:1.02.77-6ubuntu2) ... Setting up watershed (7) ... update-initramfs: deferring update (trigger activated) Setting up lvm2 (2.02.98-6ubuntu2) ... update-initramfs: deferring update (trigger activated) Processing triggers for libc-bin (2.19-0ubuntu6.4) ... Processing triggers for initramfs-tools (0.103ubuntu4.2) ... update-initramfs: Generating /boot/initrd.img-3.13.0-40-generic Päkeij kontents Nigè päkeij dè kontent wa folowen : * clvm: Cluster LVM Daemon for lvm2 * dmeventd: The Linux Kernel Device Mapper userspace library * dmsetup: The Linux Kernel Device Mapper userspace library * dmsetup-udeb: The Linux Kernel Device Mapper userspace library *libdevmapper-dev: The Linux Kernel Device Mapper header files *libdevmapper-event1.02.1: The Linux Kernel Device Mapper userspace library *libdevmapper1.02.1: The Linux Kernel Device Mapper userspace library *libdevmapper1.02.1-udeb: The Linux Kernel Device Mapper userspace library *liblvm2-dev: LVM2 libraries - development files *liblvm2app2.2: LVM2 application library *liblvm2cmd2.02: LVM2 command library *lvm2: The Linux Logical Volume Manager * lvm2-udeb Kommands rīleiten lvm2 dè päkeij wa folowen kommands storen in /sbin was inkluden : PV-wa rename wa not dū aveilàbol bikos PV wa rifören bai UUID . Modifaien /etc/fstab wa keyi verifai bai "mount -a" nigè kommand. Diteils wa fainden in /etc/fstab dè komment. Si osou * initramfs: LVM dè opèreiçion wa affekt sistèm dè rīstartiŋ biheivior. Bufùn sistèm wa sùpporten draivās ga inkluden intu initramfs aftèr LVM dè instoleiçion or modifaikeiçion . * mkfs * btrfs * Device mapper/dmsetup * Hot copy * Logical Disk Manager (LDM) * Logical volume management * Snapshot (computer storage) * Storage virtualization Riförènses Further reading # . # (fundamental patent). # # # # Ikstörnol liŋk * Category:Computer storage Category:Linux kernel features Category:Linux file system-related software Category:Libörol sistèm softwär